{% extends "base.html" %}
{% load url from future %}

{% block title %}{{ SITE_NAME }} | Восстановление пароля{% endblock %}

{% block page-header-block %}
    <div class="page-header"><h1>Восстановление пароля</h1></div>
{% endblock page-header-block %}

{% block breadcrumb %}
<div class="hgroup">
    <ul class="breadcrumb pull-right">
        <li><a href="{% url 'home' %}">Главная</a> <span class="divider">/</span></li>
        <li class="active">Восстановление пароля</li>
    </ul>
</div>
{% endblock breadcrumb %}

{% block content %}
<div class="col-lg-5">
<form class="form-horizontal" method="post" action="{% url 'auth_password_reset' %}">
     {% csrf_token %}

    {% if form.non_field_errors %}
        <div class="alert alert-danger" style="margin-top:10px;">
            <button type="button" class="close" data-dismiss="alert">&times;</button>
            <p>{{ form.non_field_errors|join:", " }}</p>
        </div>
    {% endif %}


    <div class="form-group{% if form.email.errors %} has-error{% endif %}">
        <label class="control-label col-lg-6 " for="id_email">Адрес электронной почты</label>
        <div class="input-group col-lg-6">
            <span class="input-group-addon">
                <i class="icon-envelope"></i>
            </span>
            <input class="form-control" type="email" name="{{ form.email.html_name }}"{% if form.email.value %} value="{{ form.email.value }}"{% endif %} id="id_email" required autofocus>
        </div>
        <span class="help-block pull-right">{% if form.email.errors %}{{ form.email.errors|join:", " }}{% else %}{{ form.email.help_text }}{% endif %}</span>
    </div>

    <div class="form-actions pull-right">
        <p><button type="submit" class="btn btn-primary"><i class="icon-ok icon-white"></i> Восстановить пароль</button></p>
    </div>

</form>
</div>

{% endblock %}
